//
//  argument_expression_list.h
//  compilation
//
//  Created by Kevin Le perf on 17/01/12.
//  Copyright (c) 2012 e2co technologie. All rights reserved.
//

#ifndef compilation_argument_expression_list_h
#define compilation_argument_expression_list_h
/*
 argument_expression_list
 : expression {printf("argument_expression_list expression\n");}
 | argument_expression_list ',' expression {printf("argument_expression_list argument_expression_list\n");}
 ;
 */
struct def_argument_expression_list{
	void * parent;
	int type;
	struct def_expression * expression;
	struct def_argument_expression_list * argument_expression_list;
};

struct def_argument_expression_list * argument_expression_list_create(void * parent){
	struct def_argument_expression_list * p = malloc(sizeof(*p));
	p->parent = parent;
	p->argument_expression_list = NULL;
	p->expression = NULL;
	p->type = 0;
	return p;
}

void argument_expression_list_print(struct def_argument_expression_list * p){
	if(p == NULL){
		printf(" NULL LLLLL\n");
		return;
	}
	fflush(stdout);
	switch(p->type){
		case 0:
			break;
		case 1:
			if(p->argument_expression_list != NULL){
				argument_expression_list_print(p->argument_expression_list);
				printf(",");
			}
		case 2:
			expression_print(p->expression);
			break;
	}
}


#endif
